<!DOCTYPE HTML>
<html lang="">
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>忆刻婚礼</title>
    <style>

    </style>

    <link rel="stylesheet" href="../src/jquery.smarttable.css">

    <script type="text/javascript" src="./js/jquery-2.0.0.min.js"></script>
    <script type="text/javascript" src="../src/jquery.smarttable.js"></script>

    <script type="text/javascript">


    </script>
</head>
<body>
<div style="padding: 20px;">
    <table id="taskTable" style="width: 700px"></table>
</div>

<!--<table id="test" style="width: 40%" >-->

<!--</table>-->
<input type="button" value="getFocusRow" onclick="getFocusRow()">
</body>

<script type="text/javascript">


    let data = [{taskId:1,caseNo:'2012<span>ddd</span>',caseNo1:'2012'},{taskId:2,caseNo:'2012',caseNo1:'2013'},{taskId:2,caseNo:'2012',caseNo1:'2013'}]

    $("#taskTable").smartTable({
        paging:true,
        fixedRight:1,
        focusRowMode:"radio", //空 radio 、 check radio
        // FocusRowColor:"red",
        sort:true,
        // group:"taskId>caseNo1",
        // fixedRight:1,
        columns:[{data: "taskId",title: "任务id",width:"240px"}
            ,{data: "caseNo1",title: "案件号1",width:"300px"}
            ,{data: "caseNo",title: "案件号",width:"300px",style:"padding:0",render:function (){
                    return `<input style="width: 100%;border:none;" onclick="test(this)">`
                }}

            ,{data: "caseNo",title: "案件号1",width:"300px"}]
    });

    $("#taskTable").stRefreshData(data);
    console.log($("#taskTable").stGetRowData(0));
    console.log($("#taskTable").stGetRowCount());


    function test(obj){
        console.log($("#taskTable").stGetRowData(obj));
    }

    function getFocusRow(){
        console.log($("#taskTable").stGetFocusRow());
        // $("#taskTable").stSetData([]);
    }
</script>

</html>
